import React, { memo, useRef } from "react";
import Son from "./son";
const index = memo(() => {
  const inputEl = useRef(null);
  const save = useRef({ value: 123 });
  const handleLog = function () {
    console.log(save);
  };
  return (
    <div>
      <h1 ref={inputEl}>useRef</h1>
      <Son></Son>
      <button onClick={(e) => handleLog()}>打印</button>
    </div>
  );
});

export default index;
